package com.toolsder.demo.spring.security.jwt.entity;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * created by 猴子请来的逗比 On 2020/7/17
 * <p>
 * 用户信息
 *
 * @author by 猴子请来的逗比
 */
@Data
public class UserInfo {

    /**
     * 姓名
     */
    private String fullName;

    /**
     * 角色
     */
    private List<String> roles;

    /**
     * 头像地址
     */
    private String avatar;

    /**
     * 介绍
     */
    private String introduction;

    public UserInfo() {
        this.fullName = "";
        this.roles = new ArrayList<>();
        this.avatar = "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif";
        this.introduction = "I am a super administrator";
    }

    public UserInfo(String fullName, List<String> roles) {
        this.fullName = fullName;
        this.roles = new ArrayList<>(roles);
        this.avatar = "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif";
        this.introduction = "I am a super administrator";
    }
}
